package com.technology.education.widget

import android.content.Context
import android.os.Parcelable
import android.util.AttributeSet
import android.util.SparseArray
import android.view.View
import androidx.recyclerview.widget.RecyclerView

/**
 *@author:create by BZY
 *Date: 2020/8/5 16
 */
class MyRecylcerView : RecyclerView {
    constructor(context: Context) : super(context)
    constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
    constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(
        context,
        attrs,
        defStyle
    )

    override fun setOverScrollMode(overScrollMode: Int) {
        super.setOverScrollMode(View.OVER_SCROLL_NEVER)
    }

    override fun onRestoreInstanceState(state: Parcelable?) {
        try {
            super.onRestoreInstanceState(state)
        } catch (e: Exception) {
        }
    }

    override fun onSaveInstanceState(): Parcelable? {
        return super.onSaveInstanceState()
    }

    override fun dispatchRestoreInstanceState(container: SparseArray<Parcelable>?) {
        try {
            super.dispatchRestoreInstanceState(container)
        } catch (e: Exception) {
        }

    }
}